package com.chuanye.cluster.utils;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class ProsUtils {
    private static Logger logger = LoggerFactory.getLogger(ProsUtils.class);

    // 默认值
    public static Properties getProperty(String path) {
        try {
            InputStream in = ProsUtils.class.getClassLoader().getResourceAsStream(path);//name为配置文件路径
            Properties p = new Properties();
            p.load(in);
            return p;
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }
}